%Script para testear BeamForm1
clear variables
close all

addpath(genpath('../'))
tic

load Ecografia.mat

c=1500; %Velocidad de propagacion en m/s
d=(11*10^-3)/(31); %Distancia entre sensores

ResX=32;
ResZ=1024;


data=abs(hilbert(RF3));
data=RF3;
D=BeamForming(data,d,rsf,c,0.015);

    figure
    imshow(D/max(max(D)))
    figure
    surf(D')

%Señal original
figure
surf(data/max(max(data)))
figure
imshow(data(3000:end,:)/max(max(data)))


%-----------------------------
%VersionBenech
%-----------------------------
Sal = BeamFormingBruto(data,d,rsf,15);
figure
surf(Sal)   
figure
    imshow(Sal'/max(max(Sal)))
            
toc    
